<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport"  content="width=device-width,height=device-height initial-scale=1">
		<link rel="stylesheet" href="res/src/css/basic.css" type="text/css" />
		<link  type="text/css" href="res/src/jquery/jquery.mobile-1.0b3.min.css" rel="stylesheet" />
		
		<script type="text/javascript" src="res/src/jquery/jquery-1.6.2.min.js"></script>
		<script type="text/javascript" src="res/src/jquery/jquery.mobile-1.0b3.min.js"></script> 
		
        
		<script type="text/javascript" src="res/src/scripts/json_sans_eval.min.js"></script>
		
		<script type="text/javascript" src="res/src/scripts/basic.min.js"></script>
		<script type="text/javascript" src="res/src/scripts/caller.min.js"></script>  
		<script type="text/javascript" src="res/src/scripts/index.min.js"></script>	
		
		
		
		
	</head>
	<body>
	  
		<!--1.-LOGIN  -->
		<div id="login" data-role="page" >
		 	<div data-role="header" data-theme="b">
		        <h1></h1>
				<a href="#view" data-icon="home" data-transition="slide"></a>
		    </div>
			<div class="css_head"></div>
			<div data-role="content" data-theme="d">
			    
			    <div data-role="fieldcontain" data-theme="e">
				    <label for="txtValue1">Usuario</label>
				    <input type="text" name="txtValue1" id="txtValue1" value="" />
				</div>	
				<div data-role="fieldcontain" data-theme="e">
				    <label for="txtValue2">Clave</label>
				    <input type="password" name="txtValue2" id="txtValue2" value="" />
				</div>	
				<div id="results">
				</div>
				<p></p>
				<a id="btnLogin" name="btnLogin" data-role="button" data-theme="b">Ingresar</a>
		  	</div>
			<div data-role="footer" data-theme="c"> 
			    <div class="css_footer"></div>
	  		</div>
		</div>
		<!--1.1.-LOGIN-ERROR  -->
	    <div id="popup" data-role="page">
			<div data-role="header" data-theme="b">
		        <h1>Mensaje</h1>
		        <a id="btnMsgLogin"   href="#login" data-icon="arrow-l"  data-transition="slide"></a>
		    </div>
			<div data-role="content" data-theme="b">
				<center>
					<h3>Usuario/clave incorrecto</h3>	
				</center>
			</div>
			<div data-role="footer" data-theme="c"> 
			    <div class="css_footer"></div>
	  		</div>
	    </div>
	 	<!--0.-CREDITOS  -->	
		<div id="view" data-role="page" data-theme="c">
		
		 	<div data-role="header" data-theme="b">
		        <h1></h1>
				<a href="#login" data-icon="arrow-l"  data-transition="slide"></a>
			 	
		    </div>
			<div class="css_head"></div>
			<div data-role="content" data-theme="d">
		    	<div class="css_logo"></div>
			</div>
	
  		<div data-role="footer" data-theme="c"> 
			 <h3> © 2011</h3>
	  	</div>
	   </div>
	<!--  -->
	<!-- Include Library --> 
	<script type="text/javascript">
		function clickExit(){try{$.mobile.changePage($("#login"),"slide")}catch(b){alert("Error clickExit: "+b.message)}}function callbackFunctionLogin(l){try{var k=false;var e=typeof l;var h="";if(e=="string"){var j=jsonParse(l);e=typeof j;if(e=="object"){if(j.Status=="1"){k=true;h="res/index"+j.CRol+".html";mySession.setRol(j.CRol)}}myCaller.callbackNotLoadingImg();if(k==true&&h!=""){switch(j.CRol){case"ADM":case"RAF":location.replace(h);break;default:location.replace("res/indexNULL.html");break}}else{$("#txtValue1").val("");$("#txtValue2").val("");alert("Usuario/clave incorrecto")}}}catch(i){alert("Error callbackFunctionLogin text: "+i.message)}}$(document).ready(function(){$("#login").live("pageshow",function(){try{$("#txtValue1").val("");$("#txtValue2").val("")}catch(b){alert("Error [id=login] pageshow: "+b.message)}});$("#btnLogin").live("click",function(){try{var e=$.trim($("#txtValue1").val());var g=$.trim($("#txtValue2").val());var f="sUser="+e+"&sPass="+g+"";myCaller.srcResource="res/src/";if(e!=""&&g!=""){myCaller.doCallService("GetLogin",f,"results","callbackFunctionLogin")}else{alert("Usuario/clave incorrecto")}}catch(h){alert("Error [id=login] pageshow: "+h.message)}})});
	</script> 
	</body>
</html>
